package com.chinairi.mall.service;

import com.chinairi.mall.controller.viewobject.GoodsInfoVO;
import com.chinairi.mall.controller.viewobject.GoodsPictureVO;
import com.chinairi.mall.model.FourNewGoods;
import com.chinairi.mall.model.GoodsPicture;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 商品图片 服务类
 * </p>
 *
 * @author gsl
 * @since 2020-09-05
 */
public interface IGoodsPictureService extends IService<GoodsPicture> {

    /**
     * 上传图片
     *
     * @param file
     * @param goodsFileClass
     * @return
     */
    GoodsPicture uploadPic(MultipartFile file, String goodsFileClass, String goodsDbid) throws IOException;

    /**
     * 储存图片信息
     *
     * @param goodsPicture   图片文件
     * @return
     */
    void uploadPicNew(GoodsPicture goodsPicture) throws IOException;

    /**
     * 查询图片
     *
     * @param goodsPictureVO
     * @return
     */
    List<GoodsPicture> searchPic(GoodsPictureVO goodsPictureVO);

    /**
     * 根据店铺id获取商品名称
     *
     * @param csDbid
     * @return
     */
    List<GoodsInfoVO> getGoodsName(String csDbid);

    /**
     * 获取四新商品名称
     *
     * @param csDbId
     * @return
     */
    List<FourNewGoods> getFourNewName(String csDbId);
}
